home *** CD-ROM | disk | FTP | other *** search
- Path: news.chalmers.se!sunic!EU.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!sxpo.fdn.org!ramses.fdn.org!simon.gris
- From: simon.gris@ramses.fdn.org (Simon Gris)
- Message-ID: <EEB7F981@ramses.fdn.org>
- Newsgroups: comp.sys.amiga.programmer
- Distribution: world
- X-FTN-To: Terence Tan
- Subject: Re: BorderTop/BorderBottom etc..
- Date: 09 Jun 94 17:04:46 +0200
- MIME-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- Organization: RAMSES BBS (France:1-6003-7015/7713/7716)
- X-GateSoftware: AmiGate 0.17 (7.6.94)
- Lines: 52
-
- In a message of 08 Jun 94 Terence Tan wrote to All:
-
- TT> @MSGID: 2:320/104.1 EEAD8EE8
- TT> @REPLYADDR terence@hitech.po.my
- TT> @PID: AmiGate 0.17 (7.6.94)
-
- TT> From: terence@hitech.po.my (Terence Tan)
-
- TT> Quick questions:
- TT> 1. What is the best way to findout the inner width/height of a window
- TT> (Currently I use [Where pWdw is a struct Window pointer]
- TT> pWdw->Width - pWdw->BorderLeft - pWdw->BorderRight or
- TT> pWdw->Height - pWdw->BorderTop - pWdw->BorderBottom). It doesn't
- TT> seem to do it properly cause I usually have to adjust it by 1 -2
- TT> pixels.
-
- The best way is :
- InnerWidth = pWdw->GZZWidth;
- InnerHeight = pWdw->GZZHeight;
-
- /* And this work even if the window is not a GZZWindow type */
-
- TT> 2. Does pWdw->BorderTop take into account the drag bar at the top?
- TT> Is it font sensitive?
-
- No ! You have to do the following :
-
- OffY = pWdw->BorderTop + pWdw->WScreen->Font->ta_YSize + 1;
- OffY = pWdw->BorderRight;
-
- TT> 3. Best way to clear a window?[BltClear??]
-
- /* This fill yor entire Window's RastPort. In a normal window this destroy
- ** the system imagery on it. Wis a GZZWindow this is great.
- */
- SetRast( pWdw->RastPort );
-
- /* Or if it is not a GZZ : */
- EraseRect( pWdw->RastPort, OffX, OffY,
- pWdw->GZZWidth + OffX - 1,
- pWdw->GZZHeight + OffY - 1 );
-
- /* or */
- SetRast( pWdw->RastPort ); /* Followed by : */
- RefreshWindowFrame( pWdw );
-
-
- Simon Gris FIDO 2:320/104.39 EMAIL: Simon.Gris@ramses.telesys-innov.fr
- Simon.Gris@ramses.fdn.org
-
- ... Contents may have settled during shipping.
-
-